package com.hm_.controller;

import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.hm_.service.EmployeeService;

@Controller
@RequestMapping("employee")
public class EmplyeeController {

		@Resource
		private EmployeeService employeeService;
	
		@GetMapping("all")
		@ResponseBody
		public Map<String, Object> findAll() {
			
			try {
				return employeeService.findAll();
			} catch (Exception e) {
				e.printStackTrace();
			}
			return null;
		}
}
